package com.br.fmn.clubedoimovel.negocio.entidade;

public class Coordinates {

	private CoordinatesOrigin coordinatesOrigin = new CoordinatesOrigin();
	private CoordinatesDestinatio coordinatesDestination = new CoordinatesDestinatio();

	/**
	 * Initialization Coordinates
	 * 
	 * @param latitudeOrigin
	 *            Origin Latitude
	 * @param longitudeOrigin
	 *            Origin Longitude
	 * @param latitudeDestination
	 *            Destination Latitude
	 * @param longitudeDestination
	 *            Destination Longitude
	 */
	public Coordinates(double latitudeOrigin, double longitudeOrigin,
			double latitudeDestination, double longitudeDestination) {

		coordinatesOrigin.latitude = latitudeOrigin;
		coordinatesOrigin.longitude = longitudeOrigin;
		coordinatesDestination.latitude = latitudeDestination;
		coordinatesDestination.longitude = longitudeDestination;

	}

	/**
	 * Set coordinates of origin.
	 * 
	 * @param latitude
	 * @param longitude
	 */
	public void setCoordinatesOrigin(double latitude, double longitude) {

		coordinatesOrigin.setLatitude(latitude);
		coordinatesOrigin.setLongitude(longitude);

	}

	/**
	 * Retrieve coorinates of origin.
	 * 
	 * @return
	 */
	public CoordinatesOrigin getCoordinatesOrigin() {

		return this.coordinatesOrigin;
	}

	/**
	 * Set coordinates of origin.
	 * 
	 * @param latitude
	 * @param longitude
	 */
	public void setCoordinatesDestination(double latitude, double longitude) {

		coordinatesDestination.setLatitude(coordinatesDestination.latitude);
		coordinatesDestination.setLongitude(coordinatesDestination.longitude);
	}

	/**
	 * Retrieve coorinates of origin.
	 * 
	 * @return
	 */
	public CoordinatesDestinatio getCoordinatesDestination() {

		return this.coordinatesDestination;
	}

	public class CoordinatesDestinatio {

		private double latitude;
		private double longitude;

		public double getLatitude() {
			return latitude;
		}

		public void setLatitude(double latitude) {
			this.latitude = latitude;
		}

		public double getLongitude() {
			return longitude;
		}

		public void setLongitude(double longitude) {
			this.longitude = longitude;
		}

	}

	public class CoordinatesOrigin {

		private double latitude;
		private double longitude;

		public double getLatitude() {
			return latitude;
		}

		public void setLatitude(double latitude) {
			this.latitude = latitude;
		}

		public double getLongitude() {
			return longitude;
		}

		public void setLongitude(double longitude) {
			this.longitude = longitude;
		}

	}

}
